<template>
  <div>
    <public-modal
      width="400px"
      :footer="false"
      :title="title"
      modalStyle="allMessage"
      :publicVisible="publicVisible"
      @handleOk="handleOk"
      @cancel="cancel"
    >
      <div slot="content">
        <div class="tipsContent">{{ content }}</div>
      </div>
    </public-modal>
  </div>
</template>
<script>
import publicModal from '@/components/publicModal'
export default {
  name: 'allMessage',
  components: { publicModal },
  props: {
    title: {
      type: String,
      default: '删除',
    },
    content: {
      type: String,
      default: '确定删除该信息么？',
    },
    publicVisible: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      records: {},
    }
  },
  methods: {
    show(records) {
      this.records = records
    },
    handleOk() {
      this.$emit('tipMessage', this.records)
    },
    cancel() {
      this.$emit('cancel')
    },
  },
}
</script>
<style lang="less">
.allMessage {
  .tipsContent {
    padding: 0.2rem 0.5rem;
    text-indent: 2em;
    font-size: 14px;
    font-family: PingFang;
    font-weight: 500;
    line-height: 20px;
    color: #7cb6ef;
    text-align: center;
  }
}
</style>
